#ifndef EVEREST_ORM_GENERATED_EVEREST_SAMPLE_MEMBER_DAO_H
#define EVEREST_ORM_GENERATED_EVEREST_SAMPLE_MEMBER_DAO_H

#include <otl.h>
#include <vector>
#include <everest-orm.h>
namespace everest
{
namespace sample
{
using namespace std;
using namespace everest::orm;

	class Member;

	class MemberDAO : public everest::orm::DataAccessObject
	{
	public:
		static const char *s_insertStmt;
		static const char *s_selectStmtById;
		static const char *s_deleteStmtById;
		static const char *s_updateStmtById;
		static const char *s_selectStmt;

	public:
		MemberDAO(otl_connect *pconn, size_t bufsize);
		virtual ~MemberDAO();

		void clear();
		int flush();
		int insert(const Member& obj);
		int update(const Member& obj);
		int remove(const Member& obj);
		int select(Member& obj);
		int select(std::vector<Member>& vec, const char *pszWhere);

	protected:
		bool m_hasInsert;
		bool m_hasUpdate;
		bool m_hasDelete;
		otl_nocommit_stream  m_insertStream;
		otl_nocommit_stream  m_updateStream;
		otl_nocommit_stream  m_deleteStream;
	}; // End of class MemberDAO
}
}// END OF NAMESPACE everest::sample
#endif // EVEREST_ORM_GENERATED_EVEREST_SAMPLE_MEMBER_DAO_H

